package com.ywgt.system.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.ywgt.system.pojo.Department;
import com.ywgt.system.mapper.DepartmentMapper;
import com.ywgt.system.service.DepartmentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yiping
 * @since 2021-01-15
 */
@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department> implements DepartmentService {

    @Autowired
    private  DepartmentMapper departmentMapper;

    @Override
    public Page<Department> findDepartmentList(Integer pageNum, Integer pageSize, Department department) {
        PageHelper.startPage(pageNum,pageSize);
        return departmentMapper.findDepartmentList(department);
    }
}
